package com.yn.service.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yn.common.model.zyorder.ZyOrder;
import com.yn.common.page.BasePage;
import com.yn.common.request.driver.CarOrderFinishedRequest;
import com.yn.common.request.sc.PageParamRequest;
import com.yn.common.request.zyorder.ZyOrderRequest;
import com.yn.common.response.driver.ZyDriverCenterListResponse;
import com.yn.common.response.driver.ZyDriverContactResponse;
import com.yn.common.response.driver.ZyDriverOrderDetailResponse;
import com.yn.common.response.driver.ZyDriverOrderListResponse;
import com.yn.common.response.zyorder.ZyOrderQuoteResponse;
import com.yn.service.zy.model.dto.ZyOrderDTO;
import com.yn.service.zy.model.query.ZyOrderQuery;
import io.swagger.models.auth.In;

import java.util.List;

/**
*  转运订单 接口
 *
*/
public interface ZyOrderService extends IService<ZyOrder> {

    /**
     * 添加订单
     * @param zyOrderRequest
     * @return
     */
    ZyOrderQuoteResponse addOrder(ZyOrderRequest zyOrderRequest,Boolean isSaveDb);

      //获取报价单
      ZyOrderQuoteResponse getQuote(ZyOrderRequest zyOrderRequest);

    /**
     * 获取订单详情
     * @param orderNo
     * @return
     */
    ZyOrderQuoteResponse getZyOrderDetail(String orderNo);

    /**
     * 分页获取订单列表
     * @param query
     * @param page
     * @return
     */
    IPage<ZyOrderDTO> listPage(ZyOrderQuery query, BasePage page);
    //取消订单
    void cancelOrder(String orderNo);

    /**
     * 订单删除
     * @param orderNos
     */
    void del(String orderNos,Integer userId);


    /**
     * 查询订单列表
     *
     * */
    BasePage<ZyDriverOrderListResponse> getZyOrderList(Integer transportType, PageParamRequest pageRequest);

    /**
     * 司机接单
     * */
    void takeOrder(String orderNo);

    //取消订单
    void driverCancelOrder(String orderNo);

    /**
     * 司机端获取订单详情
     * */
    ZyDriverOrderDetailResponse getZyDriverOrderDetail(String orderNo);

    /**
     * 管理端获取订单详情
     * */
    ZyDriverContactResponse getOrderDetail(String orderNo);

    /**
     * 司机接单后查看发单人姓名电话
     * */
    ZyDriverContactResponse getOrderCenterDetail(String orderNo);

    /**
     * 司机完成订单——将订单状态设置为已送达
     * */
    void OrderFinished(String orderNo,Integer orderStatus);

    /**
     * 管理端分页获取用车订单列表
     * @param query
     * @param pageRequest
     * @return
     */
    BasePage<ZyOrderDTO> listPage1(ZyOrderQuery query, PageParamRequest pageRequest);

    /**
     * 订单中心——司机查询已接单列表
     * */
    BasePage<ZyDriverCenterListResponse> zyOrderCenterList(Integer isAsc, PageParamRequest pageRequest);
}
